package cn.micai.base.concurrent;

import javax.servlet.*;
import java.io.IOException;
import java.math.BigInteger;

/**
 * @Auther: zhaoxinguo
 * @Date: 2018/7/9 15:47
 * @Description:
 */
public class Factorizer implements Servlet {

    private final Computable<BigInteger, BigInteger[]> c = new Computable<BigInteger, BigInteger[]>() {
        @Override
        public BigInteger[] compute(BigInteger arg) throws InterruptedException {
            return factory(arg);
        }
    };

    private final Computable<BigInteger, BigInteger[]> cache = new Memoizer<BigInteger, BigInteger[]>(c);

    private BigInteger[] factory(BigInteger arg) {
        return new BigInteger[0];
    }


    @Override
    public void init(ServletConfig config) throws ServletException {

    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }

    @Override
    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {

    }

    @Override
    public String getServletInfo() {
        return null;
    }

    @Override
    public void destroy() {

    }
}
